package com.cskaoyan.enums;

/**
 * @author 楚夏三分
 * @datetime 2023/1/4 16:12
 * @description: TODO: 使用枚举类替代较为固定且需求不高的新建数据库表格
 * TODO: 以避免使用多次if判断的代码或者新建SQL查询mapper等
 */
public enum OrderCodeStatus {

    UNPAID(101, "未付款"),
    USER_CANCEL(102, "用户取消"),
    SYS_CANCEL(103, "系统取消"),
    PAID(201, "已付款"),
    PRE_REFUND(202, "申请退款"),
    REFUND(203, "已退款"),
    SENT(301, "已发货"),
    USER_RECEIVED(401, "用户收货"),
    SYS_RECEIVED(402, "系统收货");

    private final Short code;
    private final String text;

    OrderCodeStatus(int code, String text) {

        this.code = (short) code;
        this.text = text;
    }

    public Short getCode() {
        return code;
    }

    public String getText() {
        return text;
    }
}
